from datetime import datetime

FORMAT = '%Y-%m-%d %H:%M:%S'


def strftime(timestamp, fmt=FORMAT):
    """格式化时间戳
    """
    return datetime.fromtimestamp(timestamp).strftime(fmt)


def current_datetime(fmt=FORMAT):
    return datetime.now().strftime(fmt)
